home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Pointer / DLL / MkStubsOs < prev    next >
Text File  |  1995-09-04  |  4KB  |  139 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Restrict    \
  4.  
  5.  
  6. LibName        =    Pointer
  7.  
  8.  
  9.  
  10. # Template makefile to make all .o files
  11. # and the SDLS Stubs file for DeskLib
  12. # sublibraries.
  13. # Julian Smith 16 Mar 1995.
  14.  
  15.  
  16. # The macro $(ObjectFiles) should be set at the 
  17. # start of this file, to be a space-separated
  18. # list of object files.
  19. # This is done by 'Makatic'.
  20.  
  21.  
  22. # The macro $(LibName) should also be set at the 
  23. # start of this file, to be the name of the 
  24. # DeskLib sublibrary.
  25. # This is done by 'Makatic'.
  26.  
  27. # Compiler and linker flags, These can be anything. 
  28. # All flags required by Straylight (eg CC -zM and
  29. # Link -rmf) are included in the macros $(CC) and
  30. # $(LINK).
  31. #
  32. CCFlags        =    -fahi $(CCExtra) -depend !Depend -throwback -D_DeskLib_$(LibName) -I,C:
  33. ASMFlags    =    -Stamp -NoCache -CloseExec -Quit $(ASMExtra)
  34.  
  35.  
  36. # Macros for commands, including the Straylight
  37. # tool 'cdll'. Note that DRLink doesn't seem to
  38. # work with the SDLS.
  39. #
  40. CC        =    cc -c -zM -d_DLL -JC:DLLLib.,:mem $(CCFlags)
  41. ASM        =    ObjAsm $(ASMFlags)
  42. CDLL        =    cdll
  43. LINK        =    link
  44. AS        =    as -dde -throwback
  45.  
  46.  
  47. # filename of DLL Stubs aof file. This is linked with client apps.
  48. DLL_Stubs    =    Stubs
  49.  
  50.  
  51. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  52. #
  53. # DLL_Def:        Standard definition file as per SDLS docs.
  54. # DLL_OtherStubsSource    Assembler source to be partially linked into
  55. #            the final stubs file. This will force linking
  56. #            in of stubs from any other DLLs used by this
  57. #            library when a client application is built.
  58. # DLL_PlainStubs    The vanilla stubs file created by SDLS's cdll.
  59. # DLL_OtherStubsObject    Assembled from DLL_OtherStubsSource. This
  60. #            simply imports __DeskLib_SDLS_Stubs_<libname>'s
  61. #            for all DeskLib DLLs used by this library, and
  62. #            exports __DeskLib_SDLS_Stubs_<thislibname>.
  63. #
  64. DLL_Def            =    ^.DLLDef
  65. DLL_OtherStubsSource    =    ^.OtherStubs
  66.  
  67. DLL_PlainStubs        =    PlainStubs
  68. DLL_OtherStubsObject    =    OSObj
  69.  
  70. # -------------------------------------------------------
  71. # Everything below here should probably not be changed...
  72. # -------------------------------------------------------
  73.  
  74.  
  75.  
  76. # Now all the rules...
  77.  
  78.  
  79. # Here's the two things we want to make...
  80. #
  81. All:    $(DLL_Stubs) $(ObjectFiles)
  82.  
  83. $(DLL_Stubs):    $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  84.     $(LINK) -aof -o $@ $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  85.  
  86. $(DLL_PlainStubs):    $(DLL_Def)
  87.     $(CDLL) -def $(DLL_Def) -stub $(DLL_PlainStubs)
  88.  
  89.  
  90. #$(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  91. #    $(AS) -o $(DLL_OtherStubsObject) $(DLL_OtherStubsSource)
  92.  
  93. $(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  94.     $(ASM) $(ASMFlags) -from $(DLL_OtherStubsSource) -to $(DLL_OtherStubsObject) 
  95.  
  96.  
  97. $(DLL_Def):    
  98.     | Warning: No DLL definition file exists.
  99.     | Creating a default DLL definition file: $(DLL_Def)
  100.     | This will have to be altered by hand.
  101.     $(CDLL) -def $(DLL_Def) -obj $(ObjectFiles)
  102.  
  103.  
  104.  
  105. # Rule for compiling C source code for a Straylight dynamically-linked library.
  106.  
  107. VPATH = @.^
  108.  
  109. .SUFFIXES:    .o .c .s
  110.  
  111. .c.o:
  112.     $(CC) -o $@ $<
  113.  
  114. .s.o:
  115.     $(ASM) $(ASMFlags) -from $< -to $@
  116.  
  117.  
  118.  
  119. # Dynamic dependencies:
  120. o.Restrict:    ^.c.Restrict
  121. o.Restrict:    DeskLib:h.Error
  122. o.Restrict:    DeskLib:h.Core
  123. o.Restrict:    C:h.stddef
  124. o.Restrict:    C:DLLLib.h.dll
  125. o.Restrict:    C:h.kernel
  126. o.Restrict:    DeskLib:h.Icon
  127. o.Restrict:    DeskLib:h.Wimp
  128. o.Restrict:    DeskLib:h.DragASpr
  129. o.Restrict:    DeskLib:h.KernelSWIs
  130. o.Restrict:    DeskLib:h.Screen
  131. o.Restrict:    DeskLib:h.Wimp
  132. o.Restrict:    DeskLib:h.WimpSWIs
  133. o.Restrict:    DeskLib:h.Pointer
  134. o.Restrict:    DeskLib:h.Core
  135. o.Restrict:    DeskLib:h.Icon
  136. o.Restrict:    DeskLib:h.Window
  137. o.Restrict:    DeskLib:h.Coord
  138.